LinearRegression

Author

Ben, Andrew, Pranati, Filip

1 Setup

2 Data

3 Data Visualization

The two plots shown are interactive plots of Carbon Dioxide Produced per Person vs. Mean Household Income and Carbon Dioxide Produced per Person by Mean Household Income per Year, respectively. The first plot shows Mean Household Income on the x-axis and metric tonnes of Carbon Dioxide produced per person on the y-axis. This plot shows how increasing income affects the amount of CO2 produced per person. The second plot shows the change in graph one over time, from 1950 to 2018. This plot shows how the ratio of CO2 produced over mean household income has changed over the last 68 years.

4 Linear Regression


Call:
lm(formula = co2 ~ mean_income, data = mhi_CO2)

Residuals:
    Min      1Q  Median      3Q     Max 
-37.694  -1.833  -1.397   0.259  96.540 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 1.163e+00  6.448e-02   18.04   <2e-16 ***
mean_income 6.679e-04  8.515e-06   78.44   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 5.721 on 12264 degrees of freedom
  (1120 observations deleted due to missingness)
Multiple R-squared:  0.3341,    Adjusted R-squared:  0.334 
F-statistic:  6152 on 1 and 12264 DF,  p-value: < 2.2e-16

Linear regression involves modeling the relationship between variables in a dataset in a scalar way. A linear model in the form yi = β0 + β1xi + ε is used to describe the relationship between each explanatory variable to the response accounting for random error. In this study, mean income is the explanatory variable and predicted co2 level is the response, so the model attempts to explain how changes in mean income increase or decrease predicted(co2) levels.

\(Predicted(co2) = 1.163 + .0006679(mean income)\)

For every one unit increase in mean income(measured in standardized international dollar units), we expect a .0006679 increase in co2 emission levels(measured in metric tons), or 1.47 lb increase.

Our model has an r value of .578, which shows a moderate, positive linear relationship between yearly CO2 emissions and mean household income. Our R^2 value(.3341) shows that household income only accounts for 33.41% of variation in CO2 emissions. This is not very strong, and we would want to look to manipulate our current variables or add more explanatory variables to make our model stronger.

5 Model Fit